<template>
    <btn-confirm :p-submit='submitChange' p-type="danger" p-message='您确认要禁用此客商信息录入员吗？'></btn-confirm>
</template>
<script>
    import serWorkerWith from '../../serves/api-worker-with'
    export default{
        data(){
            return{
                
            }
        },
        methods:{
            handleOpen(data){
                this.$children&&this.$children[0].handleOpen(data);
            },
            async submitChange(data){
                const res =await serWorkerWith.disable({
                    id:data.id,
                });
                if(res.code==1){
                    this.$emit('on-change',true);
                    this.$Message.success(res.message);
                    return true;
                }else{
                    this.$Message.error(res.message);
                    return false;
                }
            }
        },
        components:{
        }
    }
</script>